import { ref } from 'vue'
import { defineStore } from 'pinia'
import {getCategoryAPI} from '@/apis/layout'
export const useCategoryStore = defineStore('category', () => {
  // state导航数据列表
  const getCategoryList = ref([])
  //action获取导航数据的方法
  const getCategory =async ()=>{
   const res = await getCategoryAPI()
   console.log(res)
   getCategoryList.value=res.result
  }
   return {getCategoryList,getCategory}

})
